<h3 class="text-danger text-bold text-center">分组、域名、属性、修改，都同步更新到推广模板，请慎重修改！</h3>
<div class="form-group">
    <label for="tagGid" class="col-md-3 control-label">所属分组</label>
    <div class="col-md-5">
        <select class="form-control" name="gid" id="tagGid"
                onchange="$obj = $(this).find('option:selected');$('#gname').val($obj.text());$('#username').val($obj.attr('username'));$('#uid').val($obj.attr('uid'));">
            @foreach ($groupList as $row)
                <option uid="{{ $row['uid'] }}" username="{{ $row['username'] }}" value="{{ $row['id'] }}"
                        @if ($row['id'] === $gid) selected="selected" @endif>{{ $row['title'] }}</option>
            @endforeach
        </select>
        <input type="hidden" id="gname" name="gname" value="{{ empty($gname)? $groupList[0]['title']:$gname }}">
        <input type="hidden" id="username" name="username"
               value="{{ empty($username)? $groupList[0]['username']:$username }}">
        <input type="hidden" id="uid" name="uid" value="{{ empty($uid)? $groupList[0]['uid']:$uid }}">
    </div>
</div>
<div class="form-group">
    <label for="tagType" class="col-md-3 control-label">属性类型</label>
    <div class="col-md-5">
        <select class="form-control" name="type" id="tagType"
                onchange="$('#type_value').val($(this).find('option:selected').attr('typeValue'));">
            @foreach (config('app.attribute_type') as $key => $valueAttr)
                <option value="{{ $key }}" typeValue="{{ $valueAttr }}"
                        @if ($key === $type) selected="selected" @endif>{{ $key }}</option>
            @endforeach
        </select>
        <input type="hidden" id="type_value" name="type_value"
               value="{{ empty($type_value) ? config('app.attribute_type')['单行文本'] : $type_value}}">

    </div>
</div>
<div class="form-group">
    <label for="tagName" class="col-md-3 control-label">属性名称</label>
    <div class="col-md-5">
        <input type="text" class="form-control" name="name" id="tagName" value="{{ $name }}" autofocus>
    </div>
</div>

<div class="form-group">
    <label for="tagValue" class="col-md-3 control-label">属性值</label>
    <div class="col-md-5">
        <textarea class="form-control" rows="3" name="value" id="tagValue">{{ $value }}</textarea>
    </div>
</div>

<div class="form-group">
    <label for="tagCallTag" class="col-md-3 control-label">调用标签</label>
    <div class="col-md-5">
        <input type="text" class="form-control" name="call_tag" id="tagCallTag" value="{{ $call_tag }}" autofocus>
    </div>
</div>
@if(!empty($call_tag))
<div class="form-group">
    <label for="unCover" class="col-md-3 control-label">是否覆盖所在域名对应配置</label>
    <div class="col-md-5 radio">
        <label>
            <input type="radio" name="cover" id="unCover" value="unCover" > 不覆盖
        </label>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <label>
            <input type="radio" name="cover" id="cover" value="cover" checked="checked"> 覆盖
        </label>
    </div>
</div>
@endif